add pulp, pyomo integration tests#945
Conversation
📝 WalkthroughWalkthroughThe PR extends the cuOpt wheel test suite by adding third-party integration testing for PuLP and Pyomo. The main test script is updated to invoke two new test scripts that build these libraries from source and execute cuOpt-specific tests with pytest filtering and timeout controls. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/ok to test 93d8529 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
ci/thirdparty-testing/run_pulp_tests.sh (1)
9-12: Consider relying onset -ufor unbound variable detection.The explicit guard provides a helpful custom message, but repository convention prefers letting
set -uhandle unbound variables with default error messages. You could simplify by removing this check and using"${PIP_CONSTRAINT}"directly in the pip install command.Based on learnings: "In this repository, prefer using 'set -u' in Bash scripts to detect unbound variables and rely on the default unbound-variable error messages rather than implementing explicit guards with custom error messages."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/thirdparty-testing/run_pulp_tests.sh` around lines 9 - 12, The script contains an explicit guard that checks PIP_CONSTRAINT and exits with a custom message; repository convention prefers using set -u to detect unbound variables. Remove the if [ -z "${PIP_CONSTRAINT:-}" ] ... fi block and rely on the existing (or add) set -u at the top of run_pulp_tests.sh, then reference "${PIP_CONSTRAINT}" directly where used (e.g., the pip install or constraint flag) so an unbound variable will produce the standard set -u error instead of the custom guard.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ci/thirdparty-testing/run_pyomo_tests.sh`:
- Around line 28-34: Capture the pytest exit status after running the existing
timeout + python -m pytest command in run_pyomo_tests.sh (the block that filters
with -k "cuopt or CUOPT"), then add handling for exit code 5 (no tests
collected) similar to the PuLP script: if pytest returns 5 treat it as a
non-failure (exit 0) or otherwise propagate the original exit code; ensure you
reference the pytest invocation and the shell variable holding its exit status
so the script exits consistently.
---
Nitpick comments:
In `@ci/thirdparty-testing/run_pulp_tests.sh`:
- Around line 9-12: The script contains an explicit guard that checks
PIP_CONSTRAINT and exits with a custom message; repository convention prefers
using set -u to detect unbound variables. Remove the if [ -z
"${PIP_CONSTRAINT:-}" ] ... fi block and rely on the existing (or add) set -u at
the top of run_pulp_tests.sh, then reference "${PIP_CONSTRAINT}" directly where
used (e.g., the pip install or constraint flag) so an unbound variable will
produce the standard set -u error instead of the custom guard.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a244d300-66f5-4c14-828f-a96c9c3b0e99
📒 Files selected for processing (3)
ci/test_wheel_cuopt.shci/thirdparty-testing/run_pulp_tests.shci/thirdparty-testing/run_pyomo_tests.sh
|
/ok to test efe07ee |
|
@gforsyth Requesting your review from a CI standpoint on this @Iroy30 's PR |
gforsyth
left a comment
There was a problem hiding this comment.
I'm leaving an approval here so you can merge after these changes are made -- all relatively minor. Fix up the copyright dates, and change the echo calls to rapids-logger for better visibility in the logs, otherwise LGTM.
| @@ -0,0 +1,43 @@ | |||
| #!/bin/bash | |||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
|
|
||
| set -e -u -o pipefail | ||
|
|
||
| echo "building 'pulp' from source and running cuOpt tests" |
There was a problem hiding this comment.
Better to use rapids-logger instead of echo -- it makes it easier to parse in github actions logs.
I'd suggest replacing all echo calls with rapids-logger
| @@ -0,0 +1,34 @@ | |||
| #!/bin/bash | |||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
Description
Fixes #295
Issue
Checklist